package com.m.lib;

public class MyThread extends Thread {
    private Object lock;

    public MyThread(Object lock) {

        super();

        this.lock = lock;

    }

    @Override
    public void run() {
        try {

            synchronized (lock) {

                System.out.println("wait start=" + System.currentTimeMillis());

                lock.wait();

                System.out.println("wait end=" + System.currentTimeMillis());

            }

        } catch (InterruptedException e) {

            e.printStackTrace();

        }

    }
}
